using UnityEngine;
using System.Collections;
using System.Collections.Generic;

public class ButtonTexture {

    public enum StateButton { NORMAL, OVER, RELEASE, CLICK, LOCK, UNLOCK };
    public string baseButton = "";

    private Dictionary<StateButton, ButtonInfo> _listStates = new Dictionary<StateButton, ButtonInfo>();


    public void AddToList(StateButton state, ButtonInfo info)
    {
        _listStates.Add(state, info);
    }


    public Texture GetTexture(StateButton state)
    {
        if (_listStates.ContainsKey(state))
        {
            return _listStates[state]._texture;
        }
        return null;
    }

    public int GetNbTexture(StateButton state)
    {
        if (_listStates.ContainsKey(state))
        {
            return _listStates[state]._nbAnim;
        }
        return 0;
    }


    public ButtonInfo GetButtonInfo(StateButton state)
    {
        if(_listStates.ContainsKey(state)){
            return _listStates[state];
        }
        return null;
    }

}
